package rensoft.android.xml.w3c.impl;

import rensoft.java.xml.w3c.Element;
import rensoft.java.xml.w3c.NamedNodeMap;
import rensoft.java.xml.w3c.NodeList;

public class W3CElement implements Element {

  private final org.w3c.dom.Element element;

  public W3CElement(org.w3c.dom.Element element) {
    this.element = element;
  }

  public NamedNodeMap getAttributes() {
    return new W3CNamedNodeMap(element.getAttributes());
  }

  public NodeList getChildNodes() {
    return new W3CNodeList(element.getChildNodes());
  }

  public String getNodeName() {
    return element.getNodeName();
  }

  public String getTextContent() {
    return element.getNodeValue();
  }

}
